﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ContactDetails.ascx.cs" Inherits="TravelSite.Controls.ContactDetails" %>

<script type="text/javascript">
    $(function () {
        $("#editDialog").dialog({ modal: true, autoOpen: false, width: 1100, resizable: false,
            position: {
                my: 'center',
                at: 'center',
                of: window,
                collision: 'none',
                using: function (target, element) {
                    var fieldSize = $("#contact_fieldset").height();
                    var newTop = Math.ceil(target.top + fieldSize + 100);
                    target.top = newTop;
                    if ($("#Form1").outerHeight() < Math.ceil(target.top + fieldSize + (($.browser.chrome || $.browser.opera) ? 150 : 250))) {
                        var indent = 100;
                        if ($.browser.chrome || $.browser.opera) {
                            indent = fieldSize;
                        }
                        target.top = Math.ceil(target.top - indent);
                    }
                    if (target.top < 0) {
                        target.top = 100;
                    }
                    $(this).closest('.ui-dialog').css(target);
                }
            }
        });
        $("#editDialog").parent().appendTo(jQuery("form:first"));
        $(".ui-dialog-titlebar").hide();
    });


        function createUpdateForm(id) {
            __doPostBack('upDetails', id);
        }

        function openDetails()
        {
            $('#editDialog').dialog('open');
        }
</script>
<style type="text/css">
    .ui-tabs-panel
    {
        min-height: 500px;
    }
</style>
<div id="editDialog">
    <asp:UpdatePanel runat="server" ID="upDetails" OnLoad="upDetails_Load" UpdateMode="Conditional" ClientIDMode="Static">
            <ContentTemplate>
                <div class="row">
                    <div class="fieldset_block col-lg-12 page_area">
                        <fieldset>
                            <legend><h4><asp:Label runat="server" ID="lblDialogTitle"></asp:Label></h4></legend>
                            <asp:Label runat="server" ID="hdId" style="display:none;" />
                            <div id="contact_fieldset" class="fieldset_cotent form-horizontal">
                                <div id="tabs">
                                    <ul>
                                        <li><a href="#tabs-1">Details</a></li>
                                        <li style="display:none"><a href="#tabs-2">Notes</a></li>
                                        <li runat="server" id="tabCommentHeader"><a href="#tabCommentContent">Notes</a></li>
                                        <li><a href="#tabs-3">Bank Info</a></li>
                                        <li><a href="#tabs-4">Tour</a></li>
                                        <li><a href="#tabs-5">Bookings</a></li>
                                    </ul>
                                    <div id="tabs-1">
                                        <div class="row">
                                	    <div class="col-lg-6"> 
                                                                       
                                    	    <div class="form-group">
                                        	    <label class="col-lg-3 control-label">First Name</label>
                                                <div class="col-lg-9">
                                                    <asp:TextBox CssClass="form-control" placeholder="First Name" ID="txtFirstName" ValidationGroup="newItem" runat="server" />
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="txtFirstName" runat="server" Text="*" ValidationGroup="newItem" ForeColor="Red" />
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-3 control-label">Last Name</label>
                                                <div class="col-lg-9">
                                                    <asp:TextBox CssClass="form-control" placeholder="Last Name" ID="txtLastName" ValidationGroup="newItem" runat="server" />
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" ControlToValidate="txtLastName" runat="server" Text="*" ValidationGroup="newItem" ForeColor="Red" />
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-3 control-label">DOB</label>
                                                <div class="col-lg-9">
                                                    <asp:DropDownList ID="ddlMonthDOB" runat="server" CssClass="form-control" style="width:auto; margin-right:3px; display:inline;">
                                                            <asp:ListItem Selected="True" Value="-1">(month)</asp:ListItem>
                                                            <asp:ListItem Value="1">January</asp:ListItem>
                                                            <asp:ListItem Value="2">February</asp:ListItem>
                                                            <asp:ListItem Value="3">March</asp:ListItem>
                                                            <asp:ListItem Value="4">April</asp:ListItem>
                                                            <asp:ListItem Value="5">May</asp:ListItem>
                                                            <asp:ListItem Value="6">June</asp:ListItem>
                                                            <asp:ListItem Value="7">July</asp:ListItem>
                                                            <asp:ListItem Value="8">August</asp:ListItem>
                                                            <asp:ListItem Value="9">September</asp:ListItem>
                                                            <asp:ListItem Value="10">October</asp:ListItem>
                                                            <asp:ListItem Value="11">November</asp:ListItem>
                                                            <asp:ListItem Value="12">December</asp:ListItem>
                                                    </asp:DropDownList>
                                                
                                                    <asp:DropDownList ID="ddlDayDOB" runat="server" CssClass="form-control" style="width:auto; margin-right:3px; display:inline;">
                                                    </asp:DropDownList>
                                                
                                                    <asp:DropDownList ID="ddlYearDOB" runat="server" CssClass="form-control" style="width:auto; display:inline;">
                                                    </asp:DropDownList>
                                                
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-3 control-label">Address 1</label>
                                                <div class="col-lg-9">
                                                    <asp:TextBox CssClass="form-control" placeholder="Address Name 1" ID="txtAddress1" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-3 control-label">Address 2</label>
                                                <div class="col-lg-9">
                                                    <asp:TextBox CssClass="form-control" placeholder="Address Name 2" ID="txtAddress2" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-3 control-label">City</label>
                                                <div class="col-lg-9">
                                                    <asp:TextBox CssClass="form-control" placeholder="City" ID="txtCity" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                            
                                            <div class="form-group">
                                        	    <label class="col-lg-3 control-label">Country</label>
                                                <div class="col-lg-9">
                                                    <asp:DropDownList CssClass="form-control" ID="ddlCountryId" runat="server" DataValueField="CountryId" DataTextField="CountryName" AutoPostBack="true" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged"/>
                                                </div>
                                            </div>
                                                                                
                                            <div class="form-group">
                                        	    <label class="col-lg-3 control-label"><asp:Label runat="server" ID="lblState">State</asp:Label></label>
                                                <div class="col-lg-9">
                                                    <asp:DropDownList CssClass="form-control" ID="ddlStateId" runat="server" DataValueField="StateId" DataTextField="StateCode"/>
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-3 control-label"><asp:Label runat="server" ID="lblZipCode">Zip Code</asp:Label></label>
                                                <div class="col-lg-9">
                                                    <asp:TextBox CssClass="form-control" placeholder="Zipcode" ID="txtZip" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                        
                                        </div>
                                                                        
                                        <div class="col-lg-6">                                    
                                    	    <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Email</label>
                                                <div class="col-lg-8">
                                                    <asp:TextBox CssClass="form-control" ID="txtEmail" ValidationGroup="newItem" placeholder="Email" runat="server" />
                                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" Display="Dynamic" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="newItem" ControlToValidate="txtEmail" runat="server" Text="Invalid email" ForeColor="Red"/>
                                                </div>
                                            </div>

                                            <div class="form-group" style="display:none;">
                                        	    <label class="col-lg-4 control-label">Email Setting</label>
                                                <div class="col-lg-8">
                                                    <asp:DropDownList CssClass="form-control" ID="ddlEmailSettingId" runat="server" DataValueField="EmailSettingId" DataTextField="EmailSettingName"/>
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Mobile Phone</label>
                                                <div class="col-lg-8">
                                                    <asp:TextBox CssClass="form-control" placeholder="Mobile Phone" ID="txtMPhone" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Work Phone</label>
                                                <div class="col-lg-8">
                                            	    <asp:TextBox CssClass="form-control" placeholder="Work Phone" ID="txtWPhone" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Home Phone</label>
                                                <div class="col-lg-8">
                                                    <asp:TextBox CssClass="form-control" placeholder="Home Phone" ID="txtHPhone" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label" for="inputFirstName">Company Name</label>
                                                <div class="col-lg-8">
                                                    <asp:TextBox CssClass="form-control" placeholder="Company Name" ID="txtCompanyName" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label" for="inputFirstName">Job Title</label>
                                                <div class="col-lg-8">
                                                    <asp:TextBox CssClass="form-control" placeholder="Job Title" ID="txtJobTitle" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label" for="inputFirstName">Partner/Spouse First Name</label>
                                                <div class="col-lg-8">
                                                    <asp:TextBox CssClass="form-control" placeholder="Partner/Spouse First Name" ID="txtPartnerFirstName" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label" for="inputFirstName">Partner/Spouse Last Name</label>
                                                <div class="col-lg-8">
                                                    <asp:TextBox CssClass="form-control" placeholder="Partner/Spouse First Name" ID="txtPartnerLastName" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Agent</label>
                                                <div class="col-lg-8">
                                                    <asp:DropDownList CssClass="form-control" ID="ddlAgentId" runat="server" DataValueField="Id" DataTextField="FullName" ClientIDMode="Static"/>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Pin</label>
                                                <div class="col-lg-8">
                                                    <asp:TextBox CssClass="form-control" placeholder="Pin" ID="txtPin" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                                                                                                                                                
                                        </div>
                                    
                                        </div>
        
                                    </div>
                                    <div id="tabs-2">
                                        <div class="row">
                                            <div class="col-lg-12">
                                                <asp:TextBox CssClass="form-control" placeholder="Notes" ID="txtNotes" ValidationGroup="newItem" runat="server" TextMode="MultiLine" Rows="20" Width="100%" />
                                            </div>
                                        </div>
                                    </div>
                                    <div runat="server" id="tabCommentContent" clientidmode="Static">
                                        <asp:UpdatePanel ID="upComment" runat="server" UpdateMode="Conditional" OnLoad="upComment_Load">
                                            <ContentTemplate>
                                                <div class="row" style="overflow: auto; max-height:400px;">
                                                    <div class="col-lg-12">
                                                        <asp:Repeater runat="server" ID="rptComments">
                                                            <ItemTemplate>
                                                                <div class="col-lg-12 page_area" style="margin-bottom: 5px;">
                                                                    <div class="form-group">
                                                                        <div class="col-lg-6">
                                                                            <%# Eval("UserName")%>
                                                                        </div>
                                                                        <div class="col-lg-6">
                                                                            <div class="pull-right">
                                                                                <%# Eval("AddDateTime") != null ? Convert.ToDateTime(Eval("AddDateTime")).ToString("MM.dd.yyyy HH:mm:ss") : "" %>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <div class="col-lg-12">
                                                                            <%# Eval("Comment")%>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                
                                                            </ItemTemplate>
                                                        </asp:Repeater>
                                                
                                                    </div>
                                                </div>
                                                <div class="row" style="margin-top: 5px;">
                                                    <div class="col-lg-12">
                                                        <div class="form-group">
                                        	                <div class="col-lg-9">
                                                                <asp:TextBox CssClass="form-control" placeholder="Comment" ID="tbCommentAdd" ValidationGroup="newItem" runat="server" />
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="tbCommentAdd" runat="server" Text="*" ValidationGroup="AddComment" ForeColor="Red" />
                                                            </div>
                                                            <div class="col-lg-3">
                                                                <asp:Button CssClass="btn btn-success" ID="btnAddComment"  ValidationGroup="AddComment" Text="Add" runat="server" OnClick="btnAddComment_Click" ClientIDMode="Static" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </ContentTemplate>
                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID = "btnAddComment" EventName = "Click" />
                                            </Triggers>
                                        </asp:UpdatePanel>
                                    </div>
                                    <div id="tabs-3">
                                        <div class="row">
                                	    <div class="col-lg-6"> 
                                                                       
                                    	    <div class="form-group">
                                        	    <label class="col-lg-5 control-label">Date</label>
                                                <div class="col-lg-7">
                                                    <div class="input-group">
                                                    <asp:TextBox ID="txtBankInfoDate" CssClass="form-control" ValidationGroup="newItem" runat="server" placeholder="Date"></asp:TextBox>
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" type="button" id="btnShowBankInfoDate">
                                                            <img src="<%=ResolveClientUrl("~") %>images/calander_icon.png" alt="calander" title="Calander" />
                                                        </button>
                                                    </span>
                                                    </div>
                                                </div>
                                            </div>
                                        
                                            <div class="form-group">
                                        	    <label class="col-lg-5 control-label">Amount</label>
                                                <div class="col-lg-7">
                                                    <asp:TextBox CssClass="form-control" placeholder="Amount" ID="txtBankInfoAmount" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-5 control-label">Payment Method</label>
                                                <div class="col-lg-7">
                                                    <asp:DropDownList CssClass="form-control" ID="ddlBankInfoPaymentId"
                                                        runat="server" DataValueField="PaymentId" DataTextField="PaymentName">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-5 control-label">Vacation Company</label>
                                                <div class="col-lg-7">
                                                    <asp:DropDownList CssClass="form-control" ID="ddlVacationCompanyId" 
                                                        runat="server" DataValueField="VacationCompanyId" 
                                                        DataTextField="VacationCompanyName" ClientIDMode="Static" />
                                                </div>
                                            </div>
                                        </div>
                                        </div>
        
                                    </div>
                                    <div id="tabs-4">
                                        <div class="row">
                                	        <div class="col-lg-6"> 
                                                                       
                                    	        <div class="form-group">
                                        	        <label class="col-lg-5 control-label">Date</label>
                                                    <div class="col-lg-7">
                                                        <div class="input-group">
                                                            <asp:TextBox CssClass="form-control" placeholder="Tour Date" ID="txtTourDate" ValidationGroup="newItem" runat="server" />
                                                            <span class="input-group-btn">
                                                                <button class="btn btn-default" type="button" id="btnShowTourDate">
                                                                    <img src="<%=ResolveClientUrl("~") %>images/calander_icon.png" alt="calander" title="Calander" />
                                                                </button>
                                                            </span> 
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                        	        <label class="col-lg-5 control-label">Time</label>
                                                    <div class="col-lg-7">
                                                        <asp:TextBox CssClass="form-control" placeholder="Tour Time" ID="txtTourTime" ValidationGroup="newItem" runat="server" />
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                        	        <label class="col-lg-5 control-label">Company</label>
                                                    <div class="col-lg-7">
                                                        <asp:DropDownList CssClass="form-control" ID="dpdnTourCompanyId" ValidationGroup="newItem" DataValueField="TourCompanyId" DataTextField="TourCompanyName" runat="server"/>
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                        	        <label class="col-lg-5 control-label">Hotel</label>
                                                    <div class="col-lg-7">
                                                        <asp:DropDownList CssClass="form-control" ID="dpdnTourHotel" ValidationGroup="newItem" DataValueField="TourId" DataTextField="TourName" runat="server"/>
                                                    </div>
                                                </div>
                                        
                                                <div class="form-group">
                                        	        <label class="col-lg-5 control-label">Hotel Cost</label>
                                                    <div class="col-lg-7">
                                                        <asp:TextBox CssClass="form-control" placeholder="Hotel Cost" ID="txtTourHotelCost" ValidationGroup="newItem" runat="server" />
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                        	        <label class="col-lg-5 control-label">Verified</label>
                                                    <div class="col-lg-7">
                                                        <asp:TextBox CssClass="form-control" placeholder="Verified" ID="txtVerified" ValidationGroup="newItem" runat="server" />
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                        	        <label class="col-lg-5 control-label">Verification Sent</label>
                                                    <div class="col-lg-7">
                                                        <asp:TextBox CssClass="form-control" placeholder="Verification Sent" ID="txtVerificationSend" ValidationGroup="newItem" runat="server" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-6"> 
                                                <div class="form-group">
                                        	        <label class="col-lg-4 control-label">Notes</label>
                                                    <div class="col-lg-8">
                                                        <asp:TextBox CssClass="form-control" placeholder="Notes" ID="txtTourNotes" ValidationGroup="newItem" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                        	        <label class="col-lg-4 control-label">Confirmation #</label>
                                                    <div class="col-lg-8">
                                                        <asp:TextBox CssClass="form-control" placeholder="Confirmation Number" ID="txtConfirmationNumber" ValidationGroup="newItem" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                        	        <label class="col-lg-4 control-label">Package Price</label>
                                                    <div class="col-lg-8">
                                                        <asp:TextBox CssClass="form-control" ReadOnly="true" placeholder="" ID="txtPackagePrice" ValidationGroup="newItem" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                        	        <label class="col-lg-4 control-label">Upgrade Fee</label>
                                                    <div class="col-lg-8">
                                                        <asp:TextBox CssClass="form-control" placeholder="Upgrade Fee" ID="txtUpgradeFee" ValidationGroup="newItem" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                        	        <label class="col-lg-4 control-label">Gift</label>
                                                    <div class="col-lg-8">
                                                        <asp:TextBox CssClass="form-control" placeholder="Gift" ID="txtTourGift" ValidationGroup="newItem" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                        	        <label class="col-lg-4 control-label">Gift Cost</label>
                                                    <div class="col-lg-8">
                                                        <asp:TextBox CssClass="form-control" placeholder="Gift Cost" ID="txtGiftCost" ValidationGroup="newItem" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                        	        <label class="col-lg-4 control-label">Comments</label>
                                                    <div class="col-lg-8">
                                                        <asp:TextBox CssClass="form-control" placeholder="Comments" ID="txtTourComments" ValidationGroup="newItem" runat="server" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="tabs-5">
                                        <div class="row">
                                	    <div class="col-lg-6"> 

                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Wholesaler</label>
                                                <div class="col-lg-8">
                                                    <asp:DropDownList CssClass="form-control" ID="ddlWholesalerId" runat="server" DataValueField="WholesalerId" DataTextField="WholesalerName"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Invoice #</label>
                                                <div class="col-lg-8">
                                                    <asp:TextBox CssClass="form-control" placeholder="Invoice #" ID="txtHotelbedsInvoiceNumber" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Res #</label>
                                                <div class="col-lg-8">
                                                    <asp:TextBox CssClass="form-control" placeholder="Res #" ID="txtHotelbedsResNumber" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                                                       
                                    	    <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Date Booked</label>
                                                <div class="col-lg-8">
                                                    <div class="input-group">
                                                    <asp:TextBox ID="txtHotelbedsBookedDate" CssClass="form-control" ValidationGroup="newItem" runat="server" placeholder="Date Booked"></asp:TextBox>
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" type="button" id="btnShowHotelbedsBookedDate">
                                                            <img src="<%=ResolveClientUrl("~") %>images/calander_icon.png" alt="calander" title="Calander" />
                                                        </button>
                                                    </span>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Arrival Date</label>
                                                <div class="col-lg-8">
                                                    <div class="input-group">
                                                    <asp:TextBox ID="txtHotelbedsArrivalDate" CssClass="form-control" ValidationGroup="newItem" runat="server" placeholder="Arrival Date"></asp:TextBox>
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" type="button" id="btnShowHotelbedsArrivalDate">
                                                            <img src="<%=ResolveClientUrl("~") %>images/calander_icon.png" alt="calander" title="Calander" />
                                                        </button>
                                                    </span>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Departure Date</label>
                                                <div class="col-lg-8">
                                                    <div class="input-group">
                                                    <asp:TextBox ID="txtHotelbedsDepartureDate" CssClass="form-control" ValidationGroup="newItem" runat="server" placeholder="Departure Date"></asp:TextBox>
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" type="button" id="btnShowHotelbedsDepartureDate">
                                                            <img src="<%=ResolveClientUrl("~") %>images/calander_icon.png" alt="calander" title="Calander" />
                                                        </button>
                                                    </span>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-4 control-label">Payment Date</label>
                                                <div class="col-lg-8">
                                                    <div class="input-group">
                                                    <asp:TextBox ID="txtHotelbedsPaymentDate" CssClass="form-control" ValidationGroup="newItem" runat="server" placeholder="Payment Date"></asp:TextBox>
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" type="button" id="btnShowHotelbedsPaymentDate">
                                                            <img src="<%=ResolveClientUrl("~") %>images/calander_icon.png" alt="calander" title="Calander" />
                                                        </button>
                                                    </span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-6"> 

                                            <div class="form-group">
                                        	    <label class="col-lg-6 control-label">Client</label>
                                                <div class="col-lg-6">
                                                    <asp:DropDownList CssClass="form-control" ID="ddlBookingVacationCompanyId" runat="server" DataValueField="VacationCompanyId" 
                                                        DataTextField="VacationCompanyName" ClientIDMode="Static" />
                                                </div>
                                            </div>
                                            <div class="form-group">
                                        	    <label class="col-lg-6 control-label">Total Wholesale Cost</label>
                                                <div class="col-lg-6">
                                                    <asp:TextBox CssClass="form-control" placeholder="Total Wholesale Cost" ID="txtHotelbedsTotalWholesaleCost" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>
                                                                                                                  
                                    	    <div class="form-group">
                                        	    <label class="col-lg-6 control-label">Date YVD Paid to Expo</label>
                                                <div class="col-lg-6">
                                                    <div class="input-group">
                                                    <asp:TextBox ID="txtHotelbedsExpoPaidDate" CssClass="form-control" ValidationGroup="newItem" runat="server" placeholder="Date YVD Paid to Expo"></asp:TextBox>
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" type="button" id="btnShowHotelbedsExpoPaidDate">
                                                            <img src="<%=ResolveClientUrl("~") %>images/calander_icon.png" alt="calander" title="Calander" />
                                                        </button>
                                                    </span>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-6 control-label">Total Paid</label>
                                                <div class="col-lg-6">
                                                    <asp:TextBox CssClass="form-control" placeholder="Total Paid" ID="txtHotelbedsTotalPaid" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-6 control-label">Check #</label>
                                                <div class="col-lg-6">
                                                    <asp:TextBox CssClass="form-control" placeholder="Check #" ID="txtHotelbedsCheckNumber" ValidationGroup="newItem" runat="server" />
                                                </div>
                                            </div>

                                            <div class="form-group">
                                        	    <label class="col-lg-6 control-label">Date Expo Paid HB</label>
                                                <div class="col-lg-6">
                                                    <div class="input-group">
                                                    <asp:TextBox ID="txtHotelbedsHBPaidDate" CssClass="form-control" ValidationGroup="newItem" runat="server" placeholder="Date Expo Paid HB"></asp:TextBox>
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" type="button" id="btnShowHotelbedsHBPaidDate">
                                                            <img src="<%=ResolveClientUrl("~") %>images/calander_icon.png" alt="calander" title="Calander" />
                                                        </button>
                                                    </span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        </div>
        
                                    </div>
                                </div>
                                                                
                                <div class="button_group">
                                    <asp:Button CssClass="btn btn-success" ID="btnSave"  ValidationGroup="newItem" Text="Save" runat="server" OnClick="btnSave_Click" />
                                    <asp:Button CssClass="btn btn-info" ID="btnCancel" Text="Cancel" runat="server" OnClientClick="$('#editDialog').dialog('close'); return false;" />
                                    
                                    <asp:Button CssClass="btn btn-warning pull-right" ID="btnContracts" Text="Contracts" runat="server" OnClick="btnContracts_Click" />
                                 </div> 
                            </div>
                        </fieldset>
                    </div>
                </div>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btnContracts" />
            </Triggers>
            </asp:UpdatePanel>
</div> 
<script type="text/javascript">
    Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function (evt, args) {
        $("#<%= ddlMonthDOB.ClientID %>").change(function () {
            SetDayList("<%= ddlDayDOB.ClientID %>", "<%= ddlMonthDOB.ClientID %>", "<%= ddlYearDOB.ClientID %>");
        });
        $("#<%= ddlYearDOB.ClientID %>").change(function () {
            SetDayList("<%= ddlDayDOB.ClientID %>", "<%= ddlMonthDOB.ClientID %>", "<%= ddlYearDOB.ClientID %>");
        });
        $("#<%= ddlMonthDOB.ClientID %>").change();

        $.datepicker.setDefaults($.datepicker.regional[""]);

        $("#<%= txtBankInfoDate.ClientID %>").datepicker($.datepicker.regional["en-GB"]);
        $("#<%= txtBankInfoDate.ClientID %>").datepicker({
            showmonth: true,
            autoSize: true,
            showAnim: 'slideDown',
            duration: 'fast'
        });
        $("#btnShowBankInfoDate").click(function () {
            $("#<%= txtBankInfoDate.ClientID %>").datepicker('show');
        });

        $("#<%= txtHotelbedsBookedDate.ClientID %>").datepicker($.datepicker.regional["en-GB"]);
        $("#<%= txtHotelbedsBookedDate.ClientID %>").datepicker({
            showmonth: true,
            autoSize: true,
            showAnim: 'slideDown',
            duration: 'fast'
        });
        $("#btnShowHotelbedsBookedDate").click(function () {
            $("#<%= txtHotelbedsBookedDate.ClientID %>").datepicker('show');
        });

        $("#<%= txtHotelbedsArrivalDate.ClientID %>").datepicker($.datepicker.regional["en-GB"]);
        $("#<%= txtHotelbedsArrivalDate.ClientID %>").datepicker({
            showmonth: true,
            autoSize: true,
            showAnim: 'slideDown',
            duration: 'fast'
        });
        $("#btnShowHotelbedsArrivalDate").click(function () {
            $("#<%= txtHotelbedsArrivalDate.ClientID %>").datepicker('show');
        });

        $("#<%= txtHotelbedsDepartureDate.ClientID %>").datepicker($.datepicker.regional["en-GB"]);
        $("#<%= txtHotelbedsDepartureDate.ClientID %>").datepicker({
            showmonth: true,
            autoSize: true,
            showAnim: 'slideDown',
            duration: 'fast'
        });
        $("#btnShowHotelbedsDepartureDate").click(function () {
            $("#<%= txtHotelbedsDepartureDate.ClientID %>").datepicker('show');
        });

        $("#<%= txtHotelbedsPaymentDate.ClientID %>").datepicker($.datepicker.regional["en-GB"]);
        $("#<%= txtHotelbedsPaymentDate.ClientID %>").datepicker({
            showmonth: true,
            autoSize: true,
            showAnim: 'slideDown',
            duration: 'fast'
        });
        $("#btnShowHotelbedsPaymentDate").click(function () {
            $("#<%= txtHotelbedsPaymentDate.ClientID %>").datepicker('show');
        });

        $("#<%= txtHotelbedsExpoPaidDate.ClientID %>").datepicker($.datepicker.regional["en-GB"]);
        $("#<%= txtHotelbedsExpoPaidDate.ClientID %>").datepicker({
            showmonth: true,
            autoSize: true,
            showAnim: 'slideDown',
            duration: 'fast'
        });
        $("#btnShowHotelbedsExpoPaidDate").click(function () {
            $("#<%= txtHotelbedsExpoPaidDate.ClientID %>").datepicker('show');
        });

        $("#<%= txtHotelbedsHBPaidDate.ClientID %>").datepicker($.datepicker.regional["en-GB"]);
        $("#<%= txtHotelbedsHBPaidDate.ClientID %>").datepicker({
            showmonth: true,
            autoSize: true,
            showAnim: 'slideDown',
            duration: 'fast'
        });
        $("#btnShowHotelbedsHBPaidDate").click(function () {
            $("#<%= txtHotelbedsHBPaidDate.ClientID %>").datepicker('show');
        });
        $("#<%= txtTourDate.ClientID %>").datepicker($.datepicker.regional["en-GB"]);
        $("#<%= txtTourDate.ClientID %>").datepicker({
            showmonth: true,
            autoSize: true,
            showAnim: 'slideDown',
            duration: 'fast'
        });
        $("#btnShowTourDate").click(function () {
            $("#<%= txtTourDate.ClientID %>").datepicker('show');
        });
        $("#tabs").tabs();

        $('#ddlVacationCompanyId').change(function () {
            var sel = $('option:selected', this).val();
            $('#ddlBookingVacationCompanyId option').filter(function (index, el) {
                return el.value == sel;
            }).prop('selected', true);
        });
        $('#ddlBookingVacationCompanyId').change(function () {
            var sel = $('option:selected', this).val();
            $('#ddlVacationCompanyId option').filter(function (index, el) {
                return el.value == sel;
            }).prop('selected', true);
        });
    });
</script>